package com.tanhua.dubbo.api.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.tanhua.dubbo.api.QuestionnaireApi;
import com.tanhua.dubbo.mapper.QuestionnaireMapper;
import com.tanhua.dubbo.pojo.Questionnaire;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@DubboService(version = "1.0.0")
public class QuestionnaireApiImpl implements QuestionnaireApi {
    @Autowired
    private QuestionnaireMapper questionnaireMapper;


    @Override
    public Questionnaire queryQuestionnaireByLevel(String level) {
        QueryWrapper<Questionnaire> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("level",level);
        return this.questionnaireMapper.selectOne(queryWrapper);
    }
}
